<template>
  <div>
    <div class="head">
      <img :src="'back.png' | imagePath" />
      <p>添加换电柜</p>
      <span></span>
    </div>
    <div class="chargerAdd">
      <div class="chargerAdd-title">充电桩类别</div>
      <div class="chargerAdd-item">
        <span>类别:</span>
        <p
          @click="typeIndex = index"
          :class="typeIndex == index ? 'active' :''"
          v-for="(item,index) in ['铅酸','锂电']"
          :key="item">
            <em></em>{{item}}
        </p>
      </div>
    </div>
    <div class="chargerAdd">
      <div class="chargerAdd-title">充电桩编号</div>
      <div class="chargerAdd-item">
        <span>编号:</span>
        <input type="text" placeholder="请输入编号">
        <img :src="'sm.png' | imagePath" class="sm"/>
      </div>
      <div class="chargerAdd-item">
        <span>IMEI:</span>
        <input type="text" placeholder="请输入IMEI">
        <img :src="'sm.png' | imagePath" class="sm"/>
      </div>
    </div>
    <div class="chargerAdd">
      <div class="chargerAdd-title">详细地址</div>
      <div class="chargerAdd-item">
        <span>地址:</span>
        <input
          type="text"
          placeholder="请选择地址"
          readonly="readonly"
          @click="$.router.push('address')">
        <img :src="'toRight.png' | imagePath" class="toMore"/>
      </div>
      <div class="chargerAdd-item">
        <span>地址描述:</span>
        <input
          type="text"
          placeholder="请输入详细地址"
        >
      </div>
    </div>
    <div class="chargerAdd-btn">添加</div>
  </div>
</template>

<script>
  export default{
    data(){
      return{
        typeIndex:0
      }
    }
  }
</script>
<style>
.chargerAdd-title{
  font-size: 0.32rem;
  color: #999999;
  margin: 0 0.4rem;
  line-height: 1.09rem;
}
.chargerAdd-item{
  background-color: #FFFFFF;
  height: 1.33rem;
  padding: 0 0.4rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #EEEEEE;
}
.chargerAdd-item span{
  color: #333333;
  font-size: 0.34rem;
  width: 2rem;
}
.chargerAdd-item input{
  flex: 1;
}
.chargerAdd-item .sm{
  width: 0.68rem;
  height: 0.68rem;
}
.chargerAdd-item em{
  font-size: 0.34rem;
}
.chargerAdd-item .toMore{
  margin-right: 0;
  width: 0.1rem;
  height: 0.24rem;
}
.chargerAdd-item p{
  margin-right:1.01rem;
  display: flex;
  align-items: center;
}
.chargerAdd-item p em{
    display: block;
    width: 0.4rem;
    height: 0.4rem;
    background: url(../../assets/images/check.png) no-repeat;
    background-size: 100% 100%;
    margin-right: 0.17rem;
}
.chargerAdd-item p.active em{
  background: url(../../assets/images/checked.png) no-repeat;
  background-size: 100% 100%;
}
.chargerAdd-btn{
  width: 9.2rem;
  height: 1.06rem;
  line-height: 1.06rem;
  border-radius: 0.53rem;
  font-size: 0.42rem;
  color: #FFFFFF;
  background-color: #6DC5C6;
  margin: 0.66rem auto;
  text-align: center;
}
</style>
